package com.hltx.controller.wallet;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hltx.controller.base.BaseController;
import com.hltx.pojo.common.Page;
import com.hltx.pojo.user.User;
import com.hltx.service.user.UserManager;

/**
 * 我的钱包controller
 *
 */
@Controller
@RequestMapping("/wallet")
public class WalletController extends BaseController{
	
	@Resource(name="userService")
	private UserManager userService;
	/**
	 * 打开我的钱包页面
	 */
	@RequestMapping
	public String index(HttpSession session , HttpServletRequest request,Page page) {
		User u = (User) session.getAttribute("sessionUser");
		page.getParams().put("userid",u.getId());
		User user = userService.getUser(u);
		request.setAttribute("user", user);
		return "user/wallet";
	}
}
